<!DOCTYPE html>
<html>

	<head lang="en">
		<meta charset="UTF-8">
		<title>图片轮换</title>
		<link rel="stylesheet" href="../css/scroll.css">
		<script>
			function c(v) {
				var a = ["../images/1.gif", "../images/2.gif", "../images/3.jpg", "../images/4.jpg", "../images/5.gif"];
				document.getElementById("photo").setAttribute("src", a[parseInt(v.innerHTML) - 1]);
			}
		</script>
	</head>

	<body>
		<div class="scroll">
			<div id="num">
				<a href="#" onclick="c(this)">1</a>
				<a href="#" onclick="c(this)">2</a>
				<a href="#" onclick="c(this)">3</a>
				<a href="#" onclick="c(this)">4</a>
				<a href="#" onclick="c(this)">5</a>
			</div>
			<img src="../images/1.gif" alt="图片" id="photo" />
		</div>
	</body>

</html>